<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="css/index.css">
    <link rel="stylesheet" href="css/main.css">
    <title>主页</title>
    <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.2.3/css/bootstrap.css">
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.js" type="text/javascript"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.2.3/js/bootstrap.js" type="text/javascript"></script>
</head>
<body>
  <div class="alert alert-success" th:if="${session.tips != null}">
    <strong th:text="${session.tips}">成功!</strong>
</div>
    <main>
      <ul class="leftUl">
        <li class="ulTitle">图书管理系统</li>
        <li class="active"><a href="/home">主页</a></li>
        <li><a href="/book">图书列表</a></li>
        <li><a href="/userBook">已借列表</a></li>
        <li th:if="${!(session.user == null || session.user.getUser_permission() != 1)}"><a href="/user">用户列表</a></li>
        <li th:if="${!(session.user == null || session.user.getUser_permission() != 1)}"><a href="/editbook">图书编辑</a></li>
        <li class="login" th:if="${session.user == null}"><a href="/login">登录</a></li>
        <li class="user" th:if="${session.user != null}"><span th:text="${session.user.getUser_name()}">某某某</span><div class="exit" onclick="exit()">退出登录</div></li>
    </ul>
    <div class="main">
        <div id="ppt" class="carousel slide" data-bs-ride="carousel" data-bs-interval="5000">
            <div class="carousel-inner">
              <div class="carousel-item active">
                <img src="img/top/top1.png" class="d-block" style="width:100%">
              </div>
              <div class="carousel-item">
                <img src="img/top/top2.png" class="d-block" style="width:100%">
              </div>
              <div class="carousel-item">
                <img src="img/top/top3.png" class="d-block" style="width:100%">
              </div>
              <div class="carousel-item">
                 <img src="img/top/top4.png" class="d-block" style="width:100%">
               </div>
            </div>
            <button class="carousel-control-prev" type="button" data-bs-target="#ppt" data-bs-slide="prev">
               <span class="carousel-control-prev-icon"></span>
            </button>
            <button class="carousel-control-next" type="button" data-bs-target="#ppt" data-bs-slide="next">
             <span class="carousel-control-next-icon"></span>
            </button>
            <div class="carousel-indicators">
             <li data-bs-target="#ppt" data-bs-slide-to="0" class="active"></li>
             <li data-bs-target="#ppt" data-bs-slide-to="1"></li>
             <li data-bs-target="#ppt" data-bs-slide-to="2"></li>
             <li data-bs-target="#ppt" data-bs-slide-to="3"></li>
           </div>
          </div>
    </div>
    </main>
</body>
<script src="js/operate.js"></script>
<script src="js/index.js"></script>
</html>